package com.beself.until;

import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RestJson<T> {

    private Boolean flag; // 标示是否成功 true 代表成功  false 代表失败

    private String msg;  //错误信息

    private List<T> list; //返回数据

    private Object obj;

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public RestJson() {
    }

    public RestJson(Boolean flag, String msg, List<T> list) {
        this.flag = flag;
        this.msg = msg;
        this.list = list;
    }

    public RestJson(Boolean flag, String msg, Object obj) {
        this.flag = flag;
        this.msg = msg;
        this.obj = obj;
    }
}